<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>选择器权重</title>
		<!-- 选择器权重越高，选中几率越大 -->
		<style>
			*{/* 权值 0  很容易被覆盖 */
				color: #ff5500 !important;
				background: #ffaaff !important;
			}
			div{/* 权值  1 */
				color: #55aa00;
				background: #55ffff;
			}
			.d1{/* 权值：10 */
				color: #55007f;
				background: #ffff00;
			}
			div.d1{/* 选择器权值之和  权值 1+10  11*/
				color: #ff0000;
				background: #ffff7f;
			}
			body div.d1{/* 权值  12 */
				font-size: 25px;
				color: #ff0000;
				background: #ffff7f;
			}
			#d1{/* 权值  100 */
				font-size: 25px;
				color: #ffaaff;
				background: #55ffff;
			}
			div#d1{/* 权值  101 */
				font-size: 25px;
				color: #79d7ff;
				background: #ff952b;
			}
			div#d1:hover{/* 权值  111 */
				color: #ff0000;
				background: #ffff7f;
			}
		</style>
	</head>
	<body>
		<div class="d1" id="d1" style="color: red;">Lorem ipsum dolor sit amet consectetur adipisicing elit. Totam, voluptate vitae earum maiores nam accusantium. Repellendus consequatur quas vel debitis provident, a facilis, cum temporibus inventore similique, libero eligendi consectetur?</div>
	</body>
</html>